<template>
<!--  文件卡片-->
  <div class="folder">
    <div ref="fileIcon" class="folderIcon">
    </div>
    <div class="folderName">{{name}}</div>
  </div>
</template>

<script>
export default {
  name: "FileCard",
  props: ['name'],
  mounted(){
    let folderDom = this.$refs.fileIcon.style
    folderDom.backgroundImage = "url(" + require("@/assets/images/file.png") + ")";
    folderDom.backgroundRepeat = "no-repeat";
    folderDom.backgroundSize = "80% 90%";
    folderDom.backgroundPosition = "50% 20%";
  }
}
</script>

<style scoped>

</style>
